import request from '@/utils/request'

// 查询出警申请列表
export function listEmergency(query) {
  return request({
    url: '/attendance/emergency/list',
    method: 'get',
    params: query
  })
}

// 查询出警申请详细
export function getEmergency(overtimeId) {
  return request({
    url: '/attendance/emergency/' + overtimeId,
    method: 'get'
  })
}

// 新增出警申请
export function addEmergency(data) {
  return request({
    url: '/attendance/emergency',
    method: 'post',
    data: data
  })
}

// 修改出警申请
export function updateEmergency(data) {
  return request({
    url: '/attendance/emergency',
    method: 'put',
    data: data
  })
}

// 删除出警申请
export function delEmergency(overtimeId) {
  return request({
    url: '/attendance/emergency/' + overtimeId,
    method: 'delete'
  })
}
